﻿using System;

namespace diantou.web.enterprise
{
    /// <summary>
    /// 用户信息
    /// </summary>
    [fastCSharp.code.cSharp.webView(IsPage = false, IsPool = true)]
    partial class error : web.view<error>
    {
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        protected override bool loadView()
        {
            if (base.loadView())
            {
                if (currentUser != null)
                {
                    if (currentUser.Type == dataModel.user.type.未审核企业) return true;
                    if (currentUser.IsEnterprisePermission)
                    {
                        AjaxResponse(new fastCSharp.code.cSharp.webView.errorPath { ErrorPath = diantou.dataModel.path.pub.Default.EnterpriseIndex });
                        return false;
                    }
                }
                AjaxResponse(new fastCSharp.code.cSharp.webView.errorPath { ErrorPath = diantou.dataModel.path.pub.EnterpriseLogin });
            }
            return false;
        }
    }
}
